CMAKE_MINIMUM_REQUIRED(VERSION 2.6)

LINK_DIRECTORIES(../src)
INCLUDE_DIRECTORIES(../include ${SDL_INCLUDE_DIR} ${Boost_INCLUDE_DIR})

IF(WIN32)
  FIND_PATH(IL_ROOT il NO_DEFAULT_PATH)
  INCLUDE_DIRECTORIES(${IL_ROOT}/include)
  LINK_DIRECTORIES(${IL_ROOT}/lib)
ENDIF(WIN32)

ADD_EXECUTABLE(bin main.cc Application.cc Texture2D.cc TextureManager.cc FirstPersonCamera.cc)

IF(WIN32)
  TARGET_LINK_LIBRARIES(bin Portal ${SDL_LIBRARY}
                                   ${OPENGL_gl_LIBRARY}
				   ${OPENGL_glu_LIBRARY}
				   DevIL)

ELSE(WIN32)
  TARGET_LINK_LIBRARIES(bin Portal ${SDL_LIBRARY} 
                                   ${OPENGL_gl_LIBRARY}
				   ${OPENGL_glu_LIBRARY}
				   IL
				   ILU
				   ILUT)
ENDIF(WIN32)
